<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
    <title>娱管家</title>
    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="x5-orientation" content="portrait">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Access-Control-Allow-Origin" content="">
    <meta http-equiv="content-security-policy">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <!--mui样式-->
    <link rel="stylesheet" type="text/css" href="css/mui.min.css" />
    <link rel="stylesheet" type="text/css" href="css/mui/app.css" />
    <link rel="stylesheet" type="text/css" href="css/mui/mui.picker.css" />
    <link rel="stylesheet" type="text/css" href="css/mui/mui.picker.min.css" />
    <link rel="stylesheet" type="text/css" href="css/mui/mui.poppicker.css" />
    <!--环信-->
    <script type="text/javascript" src="js/hx/strophe.js"></script>
    <script type="text/javascript" src="js/hx/websdk-1.1.2.js"></script>
    <script type="text/javascript" src="js/hx/websdk.config.js"></script>
    <script type="text/javascript" src="js/hx/websdk.shim.js"></script>
    <script type="text/javascript" src="js/bq.js"></script>
    <!--环信-->
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=yWnFso0oyjmX79HzCx1DRz2sBtvweQfI">
    </script>
    <link rel="stylesheet" href="css/loding/fakeLoader.css" />
    <!--头像上传-->
    <link rel="stylesheet" href="css/cropper.css" />
    <script src="js/cropper.js"></script>
    <!-- 公共样式与字体  -->
    <link rel="stylesheet" href="css/public.css" />
    <link rel="stylesheet" type="text/css" href="icon-font/iconfont.css" />
    <!-- 定制样式   -->
    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet" href="css/bq.css" />
    <link rel="stylesheet" type="text/css" href="css/NewStyle.css" />
    <!-- Swiper 样式  -->
    <link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
    <link rel="stylesheet" href="css/appstyle.css" />
    <!-- 微信分享 -->
    <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
    <style type="text/css">
        .rgba {
            display: none;
        }

        html {
            background-color: #fff;
        }
    </style>
</head>

<body>
       <div class="mui-navbar-inner mui-bar mui-bar-nav pHead header_1 " style="top:0">
           <span class="iconfont icon-zuojiantou"></span>
           <h2>商品详情</h2>
       </div>
       <main class="mui-page-content pBody nearby_shop_goods" style="padding-top: 0.8rem !important">
           <pre>

			</pre>
           <!-- <div class="read-zan">
               <div class="read-box">
                   阅读
                   <span>7</span>
               </div>
               <div class="zan-box">
                   <i class="iconfont icon-dianzan"></i>
                   <span>2</span>
               </div>
           </div>
           <div class="footer-banner" style="padding: 0 0.3rem 0.9rem;">
               <div class="footer-banner-top">
                   <div>广告 <i class="iconfont icon-zuojiantou"></i> </div>
               </div>
               <div class="footer-banner-box">
                   <img src="images/footer-banner.jpg" class="I_Content_banner2" style="width:100%"/>
                   <div class="footer-banner-text">
                       <p>远方青木</p>
                       <p>让你成为有知识的人</p>
                   </div>
               </div>
           </div> -->
           <!-- <button id="nearby_shop_goodsBtn">扫码付款</button> -->

           <button id="nearby_shop_goodsBtn">
               <a href="tel:" id='nearby_shop_goodsBtn2' style="width: 100%;position: absolute;left: 0;top: 0;">立即咨询</a>
           </button>
           <!-- <a href="tel:" id='nearby_shop_goodsBtn2'>立即咨询</a> -->
           <!-- <div class="popQR">
               <div class="left">
                   <img src="" alt="" />
                   <p>微信</p>
               </div>
               <div class="right">
                   <img src="" alt="" />
                   <p>支付宝</p>
               </div>
           </div> -->
       </main>
    <div class="rgba"></div>
    <div class="" id="tan2"></div>


    <script src="js/base.js"></script>
    <script src="js/swiper.min.js"></script>
    <script type="text/javascript">

        function tan(text2) {
            $("#tan2").addClass("tan");
            $("#tan2").text(text2);
            clearTimeout(a);
            var a = setTimeout(function () {
                ding();
            }, 2000);

            function ding() {
                $("#tan2").removeClass("tan");
                $("#tan2").text("");
            };
        }

        // 返回上一页
        $(".icon-zuojiantou").on("click",function(){
            console.log("用户返回上一页");
            window.history.go(-1);
        })
        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        }
        function getshopinf(){
            var url='http://www.yuzhuli.com/api.php/Api/nearby_shop_goods';
            $.post(url, {
                id: GetQueryString('shop_id')||3
                }, function (obj) {
                    if(obj.s){
                    //广告部分
                    if(obj.ad){
                    $("#tpl_nearby_shop_goods .footer-banner").show();
                    $("#tpl_nearby_shop_goods .footer-banner-text p").eq(0).html(obj.ad.title);
                    $("#tpl_nearby_shop_goods .footer-banner-text p").eq(1).html(obj.ad.desc);
                    $("#tpl_nearby_shop_goods .I_Content_banner2").attr('src',obj.ad.img);
                    $("#tpl_nearby_shop_goods .footer-banner-box").attr('d_url',obj.ad.url);
                    $("#tpl_nearby_shop_goods .footer-banner-box").unbind('tap').bind('tap',function(){
                    var weburl = fun.base64encode($(this).attr('d_url'));
                    viewApi.go('#tpl_webview', weburl);
                    })
                    }else{
                    $("#tpl_nearby_shop_goods .footer-banner").hide();
                    }
                    //点赞部分
                    $("#tpl_nearby_shop_goods .read-box span").html(obj.d.views);
                    $("#tpl_nearby_shop_goods .zan-box span").html(obj.d.like_num);
                    $("#tpl_nearby_shop_goods .zan-box").attr('id',obj.d.nearby_shop_id);
                    $('#tpl_nearby_shop_goods .zan-box').unbind('tap').bind('tap',function(){
                    var id = $(this).attr('id');
                    Api.post2(Api.nearby_shop_goods_like,{id:id},function(res){
                    if(res.s){
                    var num = Number(obj.d.like_num) + 1;
                    $("#tpl_nearby_shop_goods .zan-box span").html(num);
                    }else{
                    if(res.m=="Token does not exist,Please login"){
                    mui.toast("请登录");
                    }
                    }
                    })
                    })
                    $('main.nearby_shop_goods pre').html(obj.d.content);
                    $('.left img').attr('src',obj.d.wechat_pay_qr);
                    $('.right img').attr('src',obj.d.alipay_qr);
                    $('#nearby_shop_goodsBtn2').attr({'href':'tel:'+obj.mobile,'type':obj.mobile});
                    }else{
                    mui.toast(obj.m);
                    }
            })
        };
        getshopinf()



        var parm = GetQueryString('id') || 7126;
        var url = 'http://www.yuzhuli.com/api.php/Api/nearby_shop_detail';

       
    </script>

</body>

</html>
